import axios from 'axios'

export function EmailConfirm(userId,code) {
  const data = {
    userId,
    code
  }
  return axios.post('/api/Accounts/ConfirmEmail', data)
    .then((res) => {
      return Promise.resolve(res.data)
    })
    .catch((err) => {
      return Promise.reject(err.data)
    })
}
//邮箱订阅
export function Subscribe(address) {

  return axios.post('/api/Subscription/'+address)
    .then((res) => {
      return Promise.resolve(res.data)
    })
    .catch((err) => {
      return Promise.reject(err.data)
    })
}

